<?php

App::uses('AppModel', 'Model');

class LogsDao extends AppModel {

  public $useTable = false;
	
  function insert($tipo,$texto){
  	$queryString = 'INSERT INTO logs (id,tipo,texto,fecha) VALUES (null,"'.$tipo.'","'.$texto.'",CURRENT_TIMESTAMP);';
   	$this->query($queryString);
  	
  }
    
    
}



/*
 * 
 * CREATE TABLE `logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tipo` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `texto` varchar(250) COLLATE utf8_unicode_ci DEFAULT NULL,
  `fecha` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

*
 */
?>